home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * Simple little test program for DUALMON.C
- */
-
- #include <conio.h>
- #include "dualmon.h"
-
- void main( void )
- {
- /* Vars */
- int i;
-
- /* Clear both monitors */
- clrscr(); /* EGAVGA */
- ClearMono(); /* Mono */
-
- /* Loop and print backwards on each screen */
- for( i = 24; i > 0; i-- )
- {
- gotoxy( 1, i );
- cprintf( "I'm here at line %d", i );
-
- /*
- * Try some different attributes
- * 0x07 = normal (indicated by passing 0 to PrintToMono())
- * 0x01 = underline normal
- * 0x70 = reverse video
- * 0x0f = high intensity
- * 0x81 = blink
- * etc...
- */
- if( i > 20 )
- PrintToMono( i, 1, 0, "And I'm here at line %d (normal)", i );
- else if( i > 15 )
- PrintToMono( i, 1, 0x01, "And I'm here at line %d (underline)", i );
- else if( i > 11 )
- PrintToMono( i, 1, 0x70, "And I'm here at line %d (reverse)", i );
- else if( i > 8 )
- PrintToMono( i, 1, 0x0f, "And I'm here at line %d (high intensity)", i );
- else if( i > 4 )
- PrintToMono( i, 1, 0x81, "And I'm here at line %d (blink)", i );
- else
- PrintToMono( i, 1, 0, "And I'm here at line %d (back to normal)", i );
- }
-
- /* Wait for a keypress */
- getch();
-
- /* Clear both monitors */
- clrscr(); /* EGAVGA */
- ClearMono(); /* Mono */
-
- /* Scrolling test */
- gotoxy( 1, 24 );
- for( i = 1; i < 50; i++ )
- {
- printf( "Writing line #: %d\n", i );
- PrintToMono( 0, 0, 0, "Mono writing line #: %d", i );
- }
-
- /* Wait for key */
- printf( "Press any key..." );
- PrintToMono( 0, 0, 0, "Press any key..." );
- getch();
-
- /* Clear both monitors */
- clrscr(); /* EGAVGA */
- ClearMono(); /* Mono */
- }
-
-